package com.ssm.basis.web.jackson.dictionary;

import org.springframework.cache.annotation.Cacheable;

import javax.validation.constraints.NotEmpty;

import static com.ssm.basis.service.constant.CacheNameConstant.DICT_TRANSLATE;

public interface IDictionaryTranslate {
    /**
     * @see Cacheable 查找缓存，有就返回，没有就执行方法体，将结果缓存起来
     */
    @Cacheable(cacheNames = {DICT_TRANSLATE}, key = "#type.concat(#code)")
    String getNameByTypeAndCode(@NotEmpty String type, @NotEmpty String code);
}
